
		* Figure A2
		* Maps
		
		* Panel A: Geographic Distribution of School Finance Reforms
	shp2dta using cb_2018_us_state_500k.shp, database(usdb_state) ///
	coordinates(uscoord_state) genid(id) replace
	
		use "usdb_state.dta",clear
		
		ren STATEFP stfips 
		destring stfips, replace
		drop if stfips==2 /* Alaska*/
		drop if stfips==15 /*Hawai*/
		drop if stfips==60 /*AMERICAN SAMOA*/
		drop if stfips==66 /*GUAM*/
		drop if stfips==69 /*Northern Mariana Islands*/
		drop if stfips==72 /*PUERTO RICO*/
		drop if stfips==78 /*VIRGIN ISLANDS*/

		save "usdb_state.dta", replace
		
		merge 1:1 stfips using "finance_events.dta"
		************
		drop _merge
	
		recode CSFR_year_BJH (1991 = 1 "1991: Kentucky, Texas " ) ///
	(1993 = 2 "1993: Massachusetts") (1994 = 3 "1994: Idaho, Michigan" ) ///
	(1995 = 4 "1995: Colorado, Alabama") (1996 = 5 "1996: Wyoming") ///
	(1997 = 6 "1997: North Carolina, Tennessee") (1998 = 7 "1998: Ohio, New Jersey") ///
	(1999 = 8 "1999: Vermont, New Hampshire") (2003 = 9 "2003: Maryland") ///
	(2005 = 10 "2005: Arkansas") (2006 = 11 "2006: Kansas, New York, Montana") ///
	(2007 = 12 "2007: Missouri") (2009 = 13 "2009: North Dakota") ///
	(2011 = 14 "2011: Washington") ///
	, gen(qqqq)
	
		spmap qqqq using uscoord_state , id(id) fcolor(stc1%100 stc2%100 stc3%100 ///
	stc4%100 stc5%100 stc6%100 stc7%100 stc8%100 stc9%100 stc10%100 stc11%100 stc12%100 ///
	stc13%100 stc14%100) clmethod(unique)  ndfcolor(white) ndlabel("No Reform") ///
	title("", size(vlarge)  ) title("", size(large) ) legend(pos(6) col(3)  ///
	ring(1) size(small) symx(*.99) symy(*.99))
	
	
	* Panel B: Geographic Distribution of School Finance Reforms
	
	* use the following shape file 
	shp2dta using schooldistrict_sy1718_tl18.shp, database(usdb_sch_dist) ///
	coordinates(uscoord_sch_dist) genid(id) replace
	
	use "/Users/easker/Dropbox/ABR Rep JUE/data/maps/district_shape_files/usdb_sch_dist.dta", clear
		
		rename STATEFP stfips
		destring stfips, replace
		
		rename GEOID ncesid

		drop if stfips==2 /* Alaska*/
		drop if stfips==15 /*Hawai*/
		drop if stfips==60 /*AMERICAN SAMOA*/
		drop if stfips==66 /*GUAM*/
		drop if stfips==69 /*Northern Mariana Islands*/
		drop if stfips==72 /*PUERTO RICO*/
		drop if stfips==78 /*VIRGIN ISLANDS*/
	
	 merge 1:1 ncesid using ///
	 "/Users/easker/Dropbox/ABR Rep JUE/data/maps/district_shape_files/sample_district_id.dta"

	   *drop if _merge==1
	   gen ex_district=0
	   replace ex_district=1 if _merge==3
	   drop _merge
		
	   destring ncesid, replace
	
	spmap ex_district using uscoord_sch_dist, id(id) fcolor(white blue) ///
		clmethod(unique) ndfcolor(white) ndlabel("No Data") ///
		title("", size(vlarge))   legend(pos(6) row(3) ring(1) size(4.5) ///
		symx(*.9) symy(*.9) label(2 "Not in sample") ///
		label(3 "Districts in the sample")) ocolor(gs15) osize(gs13)

	
	
	
	
	
	
	
	
	
	
	
	
	
	